package com.yubest.junit.asyntask;

/**
 * 任务1
 *
 * @Author: hweiyu
 * @Date: 2022/10/27 16:35
 */
public class MyTask3 implements Task {

    @Override
    public int exec() {
        long startTime = System.currentTimeMillis();
        System.out.println("MyTask3 开始执行");
        try {
            Thread.sleep(3000);
        } catch (InterruptedException e) {
            throw new RuntimeException(e);
        }
        long endTime = System.currentTimeMillis();
        System.out.println("MyTask3 执行完成，耗时：" + (endTime - startTime) / 1000);
        return 3;
    }
}
